package it.prucina.test;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class tablayout extends TabActivity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tablayout);
		
		Resources res = getResources();
		TabHost tabhost = getTabHost();
		TabHost.TabSpec spec;
		Intent intent;
		
		intent = new Intent().setClass(this, list_layout.class);
		spec = tabhost.newTabSpec("artist").setIndicator("Artists", res.getDrawable(R.drawable.ic_tab_artists))
		.setContent(intent);
	    tabhost.addTab(spec);

		intent = new Intent().setClass(this, grid_view.class);
		spec = tabhost.newTabSpec("albums").setIndicator("Albums", res.getDrawable(R.drawable.ic_tab_albums))
		.setContent(intent);
	    tabhost.addTab(spec);

		intent = new Intent().setClass(this, table_layout.class);
		spec = tabhost.newTabSpec("songs").setIndicator("Songs", res.getDrawable(R.drawable.ic_tab_songs))
		.setContent(intent);
	    tabhost.addTab(spec);
	    
	    intent = new Intent().setClass(this, webview.class);
	    spec = tabhost.newTabSpec("web").setIndicator("Web", res.getDrawable(R.drawable.ic_tab_songs))
	    .setContent(intent);
	    tabhost.addTab(spec);
	    
	    tabhost.setCurrentTab(2);
	}

}
